package com.stars.pao.junit01;

public class Unit {
    private Square targetSquare;

    public void occupy(Square square) {
        if (targetSquare != null) {
            targetSquare.clearOccupant();
        }
        this.targetSquare = square;
        square.setOccupant(this);
    }


    public Square getTargetSquare() {
        return targetSquare;
    }
}
